<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('scenic_spot_goods', function (Blueprint $table) {
            $table->tinyInteger('goods_status')->default(0)->comment('1 正常 , 2 下架(不限于此 , 其他非正常情况补充到desc  )')->after('book_notice');
            $table->string('goods_status_desc',125)->default('')->comment('门票不正常原因')->after('goods_status');
            \Illuminate\Support\Facades\DB::statement("ALTER TABLE dove_scenic_spot_goods
MODIFY COLUMN refund_rule varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '退改规则' AFTER passenger_limit;");
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('dove_scenic_spot_goods', function (Blueprint $table) {
//            $table->removeColumn("refund_rule");
        });
    }
};
